load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "metadef",
    srcs = [
        "db.go",
        "system.go",
    ],
    importpath = "github.com/pingcap/tidb/pkg/meta/metadef",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/parser/ast",
        "//pkg/parser/mysql",
    ],
)

go_test(
    name = "metadef_test",
    timeout = "short",
    srcs = ["db_test.go"],
    embed = [":metadef"],
    flaky = True,
    shard_count = 3,
    deps = ["@com_github_stretchr_testify//require"],
)
